package hilos;


public class Main {

    
    public static void main(String[] args) throws InterruptedException {
        Runnable r = new Hilo();
        Thread t = new Thread(r);        
        t.start();
           Thread.sleep(1000);        
        t.suspend();             
            Thread.sleep(1000);        
        t.resume();        
        Thread.sleep(1000);        
        t.stop();
        
        Thread hilo = new Hilo2();
        hilo.start();
       
        
    }
    static class Hilo implements Runnable{
        public void run() {
            System.out.println("Hilo.run()");
            for (int i = 0; i < 100000; i++) {
                System.out.println(i);
            }
        }        
    }
    static class Hilo2 extends Thread{
        public void run() {
            System.out.println("Hilo2.run()");
            for (int i = 0; i < 100000; i++) {
                System.out.println((char)i);
            }
        }        
    }
}
